{extend name="public:base" /}

{block name="style"}

<style type="text/css">
    .details{padding: 15px 10px 20px;}
    .details li{padding-top: 5px;width: 50%;float: left;}
    .details li img{height: 98px;border: 1px solid #5e5d5d}
    .details li span{display: block;float: left;width: 120px;line-height: 30px;text-align: right;}
    .details li p{display: block;float: left;line-height: 30px;margin-left: 5px}
    .details li input{display: block;float: left;width: 150px;height: 28px;line-height: 28px;border: 1px solid #90988a;}
    .details .proof{padding-top: 15px;}
    .details .proof p{font-size: 18px;line-height: 30px;text-align: center;color: red;}
    .details .but{width: 180px; margin: 0px auto;padding-top: 10px;}
</style>

{/block}

{block name="content"}
<div style="width: 500px;height:auto; padding-top: 20px">

        <div id="from" class="layui-form"  >
            <input type="hidden" name="id" value="{$data.id}" id="id">

            <div class="layui-form-item">
                <label class="layui-form-label">用户昵称</label>
                <div class="layui-input-block">
                    <input type="text" name="nickname" value="{$data.nickname}" lay-verify="required" disabled="disabled" autocomplete="off" class="layui-input">
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">用户账号</label>
                <div class="layui-input-block">
                    <input type="text" name="account" value="{$data.account}" lay-verify="required" disabled="disabled" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">名字</label>
                <div class="layui-input-block">
                    <input type="text" name="" value="{$data.name}" lay-verify="required" disabled="disabled" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">手机号</label>
                <div class="layui-input-block">
                    <input type="text" name="" value="{$data.phone}" lay-verify="required" disabled="disabled" autocomplete="off" class="layui-input">
                </div>
            </div>


            <div class="layui-form-item">
                <label class="layui-form-label">商品</label>
                <div class="layui-input-block">
                    <input type="text" name="name" lay-verify="required" disabled="disabled" autocomplete="off" class="layui-input" value="{$data.name}">
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">订单地址</label>
                <div class="layui-input-block">
                    <textarea name="address" type="text/plain" disabled="disabled" class="layui-input" style="height:auto;width:390px">{$data.address}</textarea>
                </div>
            </div>


            <div class="layui-form-item">
                <label class="layui-form-label">物流公司</label>
                <div class="layui-input-block">
                    <input type="text" name="logistics" lay-verify="required" disabled="disabled" class="layui-input" value="{$data.logistics ? $data.logistics:'未发货'}">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">物流单号</label>
                <div class="layui-input-block">
                    <input type="text" name="logi_number" lay-verify="required" disabled="disabled" class="layui-input" value="{$data.logi_number ? $data.logi_number:'未发货'}">
                </div>
            </div>


            <!--<div class="layui-form-item">-->
                <!--<div class="layui-input-block">-->
                    <!--<button class="layui-btn" lay-submit lay-filter="formDemo" onclick="SubmitSend()">返回列表</button>-->
                    <!--&lt;!&ndash;<button type="submit" class="layui-btn" lay-filter="formDemo">立即提交</button>&ndash;&gt;-->
                <!--</div>-->
            <!--</div>-->
        </div>

    </div>

{/block}

{block name="javascript"}

<script type="text/javascript">

    function order_del(id){
        layer.confirm('确定为删除吗？不可更改！', function(index){
            $.ajax({
                type: 'POST',
                url: '{:url("Package/order_del")}',
                dataType: 'json',
                data: {id: id,status:0},
                success: function (data) {
                    layer.close(index);
                    if( data.result != 0 ){

                        layer.open({
                            content: data.msg//
                            ,yes: function(index, layero){
                                layer.close(index);
                            }
                        });
                    }else{

                        layer.open({
                            content: data.msg//
                            ,yes: function(index, layero){
                                var tk = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
                                parent.layer.close(tk);
                                layer.close(index);
                            }
                            ,cancel:function(index){
                                var tk = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
                                parent.layer.close(tk);
                                layer.close(index);
                            }
                        });
                    }
                }
            });

        });
    }

    function order_puy(id){
        layer.confirm('确定发货吗？不可更改！', function(index){

            var express_code = $("#express_code").val();
            var express_name = $("#express_name").val();
            if( express_name == "" ){
                layer.close(index);
                prompt_From_one("请输入快递公司名");
                return false;
            }
            if( express_code == "" ){
                layer.close(index);
                prompt_From_one("请输入快递单号");
                return false;
            }

            $.ajax({
                type: 'POST',
                url: '{:url("GoodsOrder/order_fh")}',
                dataType: 'json',
                data: {id: id,express_code:express_code,express_name:express_name},
                success: function (data) {
                    layer.close(index);
                    if( data.result != 0 ){

                        layer.open({
                            content: data.msg//
                            ,yes: function(index, layero){
                                layer.close(index);
                            }
                        });
                    }else{

                        layer.open({
                            content: data.msg//
                            ,yes: function(index, layero){
                                var tk = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
                                parent.layer.close(tk);
                                layer.close(index);
                            }
                            ,cancel:function(index){
                                var tk = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
                                parent.layer.close(tk);
                                layer.close(index);
                            }
                        });
                    }
                }
            });
        });
    }
</script>

{/block}